#include <iostream>

using namespace std;
class Singleton
{
public:
    static Singleton& getIntstence()
    {
        static Singleton pp(10);
        return pp; 
    }

    void display()
    {
        cout << "_a = " << _a << endl;
    }
     ~Singleton()
    {
        cout << __FUNCTION__ << endl;
    }
private:
    Singleton(int a):_a(a)
    {
        cout << __FUNCTION__ << endl;
    }
   
private:
    int _a;



};

int main()
{
    Singleton &p =  Singleton::getIntstence();
    p.display();
    return 0;
}

